#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<stack>
#include<queue>
using namespace std;

#include"stack.h"
#include"queue.h"

void test_stack()
{
	//st::stack<int, std::vector<int>> st1;
	st::stack<int> st1;
	st1.push(1);
	st1.push(2);
	st1.push(3);
	st1.push(4);

	while (!st1.empty())
	{
		cout << st1.top() << " ";
		st1.pop();
	}
	cout << endl;

	st::stack<int, std::list<int>> st2;
	st2.push(1);
	st2.push(2);
	st2.push(3);
	st2.push(4);

	while (!st2.empty())
	{
		cout << st2.top() << " ";
		st2.pop();
	}
	cout << endl;
}

void test_queue()
{
	//que::queue<int, vector<int>> q;
	que::queue<int> q1;
	q1.push(1);
	q1.push(2);
	q1.push(3);
	q1.push(4);

	while (!q1.empty())
	{
		cout << q1.front() << " ";
		q1.pop();
	}
	cout << endl;

	que::queue<int, list<int>> q2;
	q2.push(1);
	q2.push(2);
	q2.push(3);
	q2.push(4);

	while (!q2.empty())
	{
		cout << q2.front() << " ";
		q2.pop();
	}
	cout << endl;
}

int main()
{
	test_stack();
	test_queue();
	return 0;
}